import { SET_ACOUPONlIST, SET_UCOUPONlIST, SET_COUPONlIST, SET_COUPONLIST_TO_EMPTY, SET_COUPONLOADING, SET_COUPONCLICK, SET_SELECTEDCOUPON } from './../mutation_types'

const state = {
  aCouponList: '',
  uCouponList: '',
  CouponList: '',
  couponLoading: true,
  couponClick: false,
  selectedCoupon: ''
}

const mutations = {
  [SET_ACOUPONlIST] (state, aCouponList) {
    state.aCouponList = aCouponList
  },
  [SET_UCOUPONlIST] (state, uCouponList) {
    state.uCouponList = uCouponList
  },
  [SET_COUPONlIST] (state, CouponList) {
    state.CouponList = CouponList
  },
  [SET_COUPONLOADING] (state, couponLoading) {
    state.couponLoading = couponLoading
  },
  [SET_SELECTEDCOUPON] (state, selectedCoupon) {
    state.selectedCoupon = selectedCoupon
  },
  [SET_COUPONCLICK] (state, couponClick) {
    state.couponClick = couponClick
  },
  [SET_COUPONLIST_TO_EMPTY] (state, uCouponList) {
    state.aCouponList = ''
    state.uCouponList = ''
    state.CouponList = ''
    state.couponLoading = true
    state.couponClick = false
    state.selectedCoupon = ''
  }
}

export default {
    state,
    mutations
}